package com.example.wx.dailyreport.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.example.wx.dailyreport.pojo.ReportRoles;
import com.example.wx.dailyreport.pojo.User;
import com.example.wx.dailyreport.pojo.UserRoleAuthority;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author hulinbo
 * @since 2020-07-28
 */
public interface UserService extends IService<User> {
    User findByUsername(String username);

    boolean updatePassword(User user);

    List<UserRoleAuthority> selectUserInPage(User user, Long role_flag, Long authority_flag, int page, int limit);

    boolean updateUserRoleAuthority(Integer id, Integer[] roleids, Integer[] addAuthorities, Integer[] delAuthorities);

    Map<String, Object> getAuthoritiesByUserId(Integer id);

    int selectUserCount(User user, Long role_flag, Long authority_flag);

    boolean updateName(User user);

    ReportRoles getUserClassInfo(String username);
}
